package com.stork.cms.utilities;

import android.app.Activity;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;


public class Utils {
	public static boolean isDeviceOffline(Activity activity) {
		ConnectivityManager cm = (ConnectivityManager) 
				activity.getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo activeNetworkInfo = cm.getActiveNetworkInfo();
		return (activeNetworkInfo == null || !activeNetworkInfo
				.isConnectedOrConnecting());
	}
}
